home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programmierung
/
Power-Programmierung (Tewi)(1994).iso
/
magazine
/
pcmagazi
/
1992
/
04
/
msgbox.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-02-05
|
762b
|
37 lines
// msgbox.h RHS 11/25/91
#if !defined(MSGBOX_H)
#define MSGBOX_H
#include"window.h"
#include"keyboard.h"
class MsgBox : public Screen
{
protected:
int key;
virtual char *msgprompt(void)
{
return "Press any key to continue...";
}
public:
MsgBox(char *title, char *message, char *prompt = "Press any key to continue...");
};
class MsgBoxPrompt : public MsgBox
{
protected:
virtual char *msgprompt(void) { return ""; }
public:
MsgBoxPrompt(char *title, char *message)
: MsgBox(title, message, "")
{
}
int RetVal(void) { return key; }
BOOL Yes(void) { return (key == 'y' || key == 'Y') ? TRUE : FALSE; }
};
#endif